package newcoder.huawei.lx_HJ4_字符串分隔;

import java.util.Scanner;

/**
 * •连续输入字符串，请按长度为8拆分每个输入字符串并进行输出；
 * •长度不是8整数倍的字符串请在后面补数字0，空字符串不处理。
 *
 * @author Mr.wang
 * @date 2021/11/12
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String line = scanner.nextLine();
            int start = 0;
            int len = line.length();
            while (len >= 8) {
                System.out.println(line.substring(start, start + 8));
                start += 8;
                len -= 8;
            }
            if (len > 0) {
                char[] chars = new char[8];
                for (int i = 0; i < 8; i++) {
                    chars[i] = '0';
                }
                for (int i = 0; start < line.length(); i++) {
                    chars[i] = line.charAt(start++);
                }
                System.out.println(String.valueOf(chars));
            }
        }
    }
}
